The present invention relates to a method of transcoding an incoming coded video signal corresponding to a sequence of pictures subdivided into sub-pictures, which method comprises in series the steps of:
A) decoding said incoming coded signal;
B) downsampling filtering said decoded signal;
C) re-encoding said filtered decoded signal
motion vectors respectively associated to said sub-pictures being transferred from the decoding side to the re-encoding one in order to be re-used during said re-encoding step and said transferring step including scaling and refining operations. The invention also relates to a corresponding transcoder. This invention may be used particularly for transcoding MPEG-2 video bitstreams to lower bit rates, when horizontal subsampling of pictures is used.
A transcoder is a system that allows to convert a previously compressed video bitstream into another bit rate video bitstream, i.e., in fact, to re-encode a coded video sequence with a new set of parameters P2 with respect to a first one P1 (the set of parameters of the original coded video sequence). The complexity of a transcoder is rather low compared to a conventional cascade of a decoder and an encoder, but the quality of the transcoded sequences is generally close to the quality of the original sequences by comparison with the situation when these ones are encoded by a stand-alone coder with parameters P2.
It is known, indeed, that a pre-encoded video stream carries some useful information such as picture types, motion vectors, quantization stepsizes, bit allocation statistics, and so on. It may then be shown, for instance in the European patent application EP 0690392 (PHF94001 CEP) that, on the basis of this already available information, the complexity of the transcoder may be further reduced. For instance, a bit rate transcoder allows to adjust the bit rate of a sequence down to the channel capacity by re-computing quantizer steps to match a targeted output bit rate, the complexity being reduced because the GOP (Group Of Pictures) structure and the motion vectors remain unchanged. Moreover, the pictures need not to be completely decoded, which allows to use a single motion-compensated loop.
It may also be interesting to modify other coding parameters. For instance, by reducing the number of points per coded line (format transcoding), less picture data have to be encoded for a given bit rate. As a consequence, more bits can be spent to encode these data, and the distorsion (i.e. the compression loss) is reduced. In the following description, it has been chosen to focus on a 3:2 horizontal subsampling (from 720 picture elements to 480 for instance), as a tradeoff between resolution loss and compression loss, but other ratios are obviously possible between the horizontal sizes of pictures before and after the subsampling operation.
With such a subsampling, the decoding and encoding parts of the transcoder cannot use the same motion vectors, since input and output macroblocks (each of 16xc3x9716 picture elements in the description) do not match, as shown in FIG. 1 for a 3:2 horizontal resizing (shown in the second line with respect to the first one showing the original macroblock aspect ratio observed in the input bit stream) and for a 4:3 horizontal resizing (shown in the third line). A motion estimation is therefore required. The document xe2x80x9cTranscoder architectures for video codingxe2x80x9d, by N. Bjxc3x6rk and al., IEEE Transactions on Consumer Electronics, vol.44, nxc2x01, February 1998, pp.88-98, proposes, for an estimation of that kind, a solution according to which a final output vector is obtained from four vectors (corresponding to four macroblocks) that are, after their extraction, mapped to a single one using an averaging or median filtering step (or simply a picking step: one out of four). The resulting vector is then scaled, by means of a division by two in both horizontal and vertical directions, and refined in order to optimize the match between the macroblock to be predicted and the motion-compensated prediction.
It is then an object of the invention to propose an improved motion estimator leading to more precise motion vectors without any increase of the hardware complexity.
To this end the invention relates to a method such as described in the preamble of the description and which is moreover characterized in that said transferring step comprises in series the following operations:
a) the scaling operation is applied to all the decoded motion vectors available at the decoding side, according to a scaling vector that is in direct relation with the resolution reduction of the downsampling filtering step;
b) among said scaled motion vectors, an extraction operation of a set of N motion vectors corresponding to N decoded sub-pictures whose area covers the downsampled picture area to be re-encoded;
c) the refinement operation;
d) a selection operation of a vector, according to a criterior such as the lowest mean absolute error.
The international patent application W0 98/19460 indeed describes a transcoding method and a transcoder in which are provided both means for implementing a change in resolution and, simultaneously, means for transferring from the input decoder to the output encoder adapted motion vectors, being in that case the result of scaling and refining operations. However said processing is not so precise as the present one.